package com.example.mybatisplusdemo.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.mybatisplusdemo.model.domain.GoodOrder;
import com.example.mybatisplusdemo.model.vo.OrderDetailVo;
import com.example.mybatisplusdemo.model.vo.OrderVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lxp
 * @since 2025-07-15
 */
public interface IOrderService extends IService<GoodOrder> {

    Page<GoodOrder> getPage(Page<GoodOrder> page, QueryWrapper<GoodOrder> queryWrapper);

    boolean createOrder(GoodOrder order);

    boolean cancelOrder(Integer orderId);

    boolean payOrder(Integer orderId);

    OrderDetailVo getOrderDetail(Integer orderId);

    List<OrderVo> getOrderListByUserId(Integer userId);

    List<OrderVo> getOrderListByStatus(Integer status);
}
